{include file="header.tpl" title="$title"}
{formtool_init src="javascripts/formtool.js"}

			<form action="{$form}" method="post" id="paymentForm" class="forms">
				<fieldset>
					<legend>Add a Payment</legend>

					<label for="Person">Person</label>

					{formtool_checkall name="users[]"}

					<div class="checkbox">
						{html_checkboxes name="users" values=$users_ids output=$users_names}
					</div>

					<label for="Amount">Amount</label>
					<input id="Amount" name="Amount" type="text" />

					<label for="Reason">Reason</label>
					<textarea id="Reason" name="Reason"></textarea>

					<input type="submit" id="submit" value="Add Payment" />
				</fieldset>
			</form>

			<div class="title">
				<h2>Last {$num} Payments</h2>
			</div>

			<table class="display">
				<thead>
					<tr>
						<th class="image">Edit</th>
						<th class="date">Date</th>
						<th class="person">Person</th>
						<th class="amount">Amount</th>
						<th>Reason</th>
					</tr>
				</thead>
				<tbody>
				{section name=payment loop=$payments}
					{strip}
					<tr class="{cycle values="gray,white"}">
						<td class="image"><a href="editPayment.php?id={$payments[payment].paymentuid}"><img src="images/payment_edit.png" alt="Edit Payment" /></a></td>
						<td>{$payments[payment].date}</td>
						<td>{$payments[payment].name}</td>
						<td class="{$payments[payment].sign} payments">${$payments[payment].amount}</td>
						<td>{$payments[payment].reason|default:"No Reason"}</td>
					</tr>
					{/strip}
				{/section}
				</tbody>
			</table>

{include file="footer.tpl"}
